<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <link rel="stylesheet" href="/api-test/static/plugins/layui/css/layui.css"/>
    <link rel="stylesheet" href="/api-test/static/css/home.css"/>
    <title>用户管理</title>
</head>

<body class="layui-view-body">
    <div class="layui-content">
        <div class="layui-row">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="form-box">
                        <div class="layui-form layui-form-item">
                            <form id="user-search-form" class="layui-inline">
                                <div class="layui-form-mid">真实姓名:</div>
                                <div class="layui-input-inline" style="width: 160px;">
                                    <input type="text" name="name" autocomplete="off" class="layui-input" placeholder="请输入真实姓名"/>
                                </div>
                                <div class="layui-form-mid">用户账号:</div>
                                <div class="layui-input-inline" style="width: 160px;">
                                    <input type="text" name="account" autocomplete="off" class="layui-input" placeholder="请输入用户账号"/>
                                </div>
                                <div class="layui-form-mid">用户状态:</div>
                                <div class="layui-input-inline" style="width: 120px;">
                                    <select name="state">
                                        <option value="">全部</option>
                                        <option value="1">有效</option>
                                        <option value="0">无效</option>
                                    </select>
                                </div>
                                <button class="layui-btn layui-btn-blue search-btn">查询</button>
                            </form>
                            <button class="layui-btn layui-bg-green fr" id="user-add">添加</button>
                        </div>

                        <table class="layui-hide" id="user-table" lay-filter="user-table"></table>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div id="user-add-dialog" class="layui-content" style="display: none">
        <form id="user-add-form" class="layui-form">
			<input type="hidden" name="token" />
            <div class="layui-form-item">
                <label class="layui-form-label">真实姓名</label>
                <div class="layui-input-block" style="width: 200px">
                    <input type="text" name="name" required="required" lay-verify="required" placeholder="请输入真实姓名" autocomplete="off" class="layui-input"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">用户账号</label>
                <div class="layui-input-block" style="width: 200px">
                    <input type="text" name="account" required="required" lay-verify="required" placeholder="请输入用户账号" autocomplete="off" class="layui-input"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">用户密码</label>
                <div class="layui-input-block" style="width: 200px">
                    <input type="password" name="password" required="required" lay-verify="required" placeholder="请输入用户密码" autocomplete="off" class="layui-input"/>
                </div>
            </div>
            <button id="user-add-submit" class="layui-btn" lay-submit="" lay-filter="user-add-submit" style="display: none;">提交</button>
        </form>
    </div>

    <div id="user-edit-dialog" class="layui-content edit-form" style="display: none;">
        <form id="user-edit-form" class="layui-form">
            <input type="hidden" name="userId"/>
			<input type="hidden" name="token" />
            <div class="layui-form-item">
                <label class="layui-form-label">真实姓名</label>
                <div class="layui-input-block" style="width: 200px">
                    <input type="text" name="name" required="required" lay-verify="required" placeholder="请输入真实姓名" autocomplete="off" class="layui-input"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">用户状态</label>
                <div class="layui-input-block" style="width: 200px">
                    <select name="state" lay-verify="required">
                        <option value="1">有效</option>
                        <option value="0">无效</option>
                    </select>
                </div>
            </div>
        </form>
    </div>

    <!-- 角色列表 -->
    <div id="user-role-dialog" style="display: none; padding: 5px 15px">
		<div id="user-role-list"></div>
    </div>

    <script src="/api-test/static/plugins/layui/layui.js"></script>
    <script src="/api-test/static/common/js/base.js"></script>
    <script src="/api-test/static/js/auth/user.js"></script>
</body>
</html>